package adv5;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;

/**
 * @author oldliu
 * @since 1.0
 */
public class BuffTest23 {
    public static void main(String[] args) {
        try {
            BufferedReader br=new BufferedReader(
                    new InputStreamReader(new FileInputStream("D:/tmp/2.txt")));
            String str = null;
             int line=0;
             while((str=br.readLine())!=null){
                System.out.println(++line+":"+str);
             }
            br.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
